1. Technical Field
The present invention relates generally to an improved distributed data processing system and, in particular to an improved method and apparatus for creating applications. Still more particularly, the present invention relates to a method and apparatus for creating client applications.
2. Description of Related Art
Distributed data processing systems involve data transfers between clients and servers (also know as services). Typically, a client locates a server, initiates a session with a server and requests the server to perform some service. The server expects requests from a client to arrive in a particular format. A server is more complex than a client because the server typically handles a large number of clients simultaneously, often fetches and stores information from a large database, creates additional transactions for other services, performs business logic, and returns information formatted according to each client channel. For example, data will be specified in a particular message format. A particular transmission protocol will deliver the message to the server. The server accepts the message protocol as its application programming model (API) to its services and returns a result. A variety of software systems, such as Enterprise Java Beans (EJB), Servlets, Java Server Pages (JSP), and XML have been implemented to enhance the development of client and server-side software.
Client applications perform a number of different functions. For example, the application on the client side handles the user interface and may provide program logic for processing user input. Additionally, a client application must match the requirements of a particular server to provide communications with the particular server. Clients are packaged and distributed according to the services provided by the server.
A graphical user interface (GUI) exists in the client application to handle what the user views on the screen. Events resulting from user input, such as mouse clicks or keyboard strokes, are detected and handled using xe2x80x9clistenersxe2x80x9d processes in the application. The events are processed by program logic. The program logic may result in requests being sent to a server. Communication with the server is provided using processes that use protocols, such as hypertext transfer protocol (HTTP), secure sockets (SSL), or Remote Method Invocation (RMI).
Client software can be either xe2x80x9cthickxe2x80x9d or xe2x80x9cthinxe2x80x9d. A thick client is typically a large client-installed application that may access a database directly and apply business logic. They typically have dependence on the client operating system and require manual support to install and configure. By contrast a thin client is typically a small application downloaded on request from a server and accesses the database through an intermediate application server. This is known as a multi-tier application. A number of different usage scenarios for clients are present, resulting in a variety of client needs being present. For example, it is typical that in a global enterprise Intranet, the client configuration is controlled by the business but the large number of clients includes older machines with slow networks (e.g. 9600 baud). Likewise, in the Internet, there is little configuration control by the business and it is estimated that a large percentage of clients worldwide still use 14.4K connections that result in very slow network speeds and downloads. A typical user will become very frustrated if downloads take longer than a minute or two. Further, mobile users require compact software that can be customized and packaged to fit on machines and operate disconnected from the network. Subsequent automated support to connect to the network is needed.
At the other end of the spectrum, power users with high-speed connections expect screen refresh times in the sub-second range and xe2x80x9cinstantaneousxe2x80x9d echoing of typed characters to provide the look and feel of processing in a local environment. In a multi-tier computing environment, the primary role of the client is to present and gather information quickly. The client application is considered a business asset independent of the network topology and server function. In these environments, it is desirable to be able to use the same client processing code for different user types and interface channels, such as automated teller machines (ATM), Kiosks, Internet [hypertext markup language (HTML)/applets], and regional office clients (applications).
Consequently, a common thin or thick client development environment for developing clients may be used to solve these problems, especially when the size and speed of the application download, integration and operation is important. Any software development environment should be based on sound software engineering principles.
Object-oriented languages have been employed in creating thin clients. Object-oriented programming environments have been presented as providing software reuse, which is a desirable feature in creating thin clients and reducing development time. In reality, the present object-oriented programming environments for developing thin clients are unable to provide enough object reuse and repeatability for quickly developing thin clients. Nor do they specify how to readily support additional message formats, protocols, data models and servers, mobile disconnected users, and caching.
Therefore, it would be advantageous to have an improved method and apparatus for a client development architecture that facilitates creating thin clients in a manner in which component reuse is increased while client development time is reduced, and multiple message formats, protocols, data models and servers, mobile disconnected users and caching can be readily integrated.
The present invention provides an architectural pattern for creating applications for a data processing system. A graphical user interface is created in which the graphical user interface includes a plurality of components. Processes for presenting the plurality of components and receiving user input are handled by a first set of graphical objects, wherein in response to selected user input, a first event is generated. An application object is created in which the application process controls an order in which the graphical objects present the set of components and process the event and wherein the application generates a second event. A transport object is created in which the transport object processes the second event and forwards the second event for processing to a destination within the plurality of destinations. A plurality of destination objects are created in which each destination object within the plurality of destinations objects handles accessing a destination within the plurality of destinations.
The present invention provides a method and apparatus in a data processing system for refreshing data in an application. A call is received to update data in the application, wherein the data is destined for a component in the application. A data type is identified for the data. Responsive to the data type being a handled data type, the data is formatted and a refresh is called on the component.
The present invention provides a method and apparatus in a data processing system for displaying a component or container. The container is displayed within a display using a first component. A location of the component or container is controlled within the display using a second component, wherein the second component controls the location and geometry of the component or container in response to receiving an event. The component or container is selectively displayed using a third component, wherein the third component generates the event.
The present invention provides a process in a data processing system for managing services in a desktop environment from an object oriented-environment. A presentation of a graphical user interface is controlled using a view controller, wherein the view controller handles user input to the graphical user interface. Responsive to a selected user input, the selected user input is sent from the view controller to an application mediator. Responsive to receiving the selected user input at the application mediator, the selected user input is processed at the application mediator. Responsive to the application mediator determining that a service is required in the desktop environment, an event is generated. Responsive to detecting the event at a listener object, a method is executed in the listener object to perform the service in the desktop environment.
The present invention provides a method and apparatus in a data processing system for managing transactions. A request event is received at a transporter object. The request event includes a target and an indication of how to handle the request event. A destination object is identified within the plurality of destination objects using the request event to form an identified destination object. The request event is sent to the identified destination object, wherein the identified destination object handles the request using the indication and accesses the target.
The present invention provides a method and apparatus in a data processing system for displaying a graphical user interface. A container is displayed in a graphical user interface from a set of containers, wherein a display of the container handled by a view controller from a set of view controllers. Each view controller handles the display of an associated container within the set of containers and user input for the associated container. A display of the set of containers is altered by an application mediator, wherein the set of containers are displayed in an order determined by the application mediator.
The present invention provides a method and apparatus in a data processing system for performing validation of user input. User input is received in a container displayed in a graphical user interface, wherein presentation of the container and the user input to the container are handled by a view controller. Responsive to receiving the user input, a call is sent to a validation object by the view controller. Responsive to the call, the validation object tests the user input using a criteria, wherein the rule is separate from the view controller.
The present invention provides a method and apparatus in a data processing system for managing permissions in an application. A user input is received at a container handled by a view controller, wherein the user input requests a change in permissions in the application. This user input, may be, for example, a change in security in an application through a login process. A view event describing the user input is generated. The view event is received at an application mediator. Responsive to receiving the view event, by the application mediator, a request event is generated and a permission corresponding to the user input is received. The permission alters an item, which may be in either of both the view controller and the application mediator.
The present invention provides a process and apparatus in a data processing system for presenting a view to a client. At an application mediator, a view event is received from a view controller, wherein the view event describes an action on a displayed container handled by the view controller. Responsive to a requirement that a change in a placement of the displayed container is required, a placement event is generated by the application mediator. A determination is then made by a placement listener as to whether the placement event includes an indication that an alternate view is to be generated. Responsive to a determination that an alternate view is to be generated, a call is sent to a method in the view controller to generate the alternate view.
The present invention provides a method and apparatus in a data processing system for processing user input in a graphical user interface. A graphical user interface is presented using a view controller, wherein the view controller handles the user input to the graphical user interface. Responsive to a selected user input, an event is sent to a first application mediator. Responsive to the first application mediator being unable to process the event, the event is sent to a second application mediator for processing, wherein the first application mediator and the second application mediator handle an order in which a set of displays are displayed by a view controller.
The present invention provides a method and apparatus in a data processing system for presenting a set of screens in a graphical user interface. A first screen within a set of screens is presented, wherein the set of screens are presented using a set of view controllers. Responsive to a selected user input to the first screen, an event is generated by a view controller within the set of view controllers identifying the user input to the first screen, which is handled by the first view controller. Responsive to detecting the event generated by the view controller, a second screen from the set of screens is selected, by an application mediator, for display by sending a response to a view controller handling the second screen.
The application mediator is initialized from reading a state machine file and control processing of view event received from virtual controllers.
The present invention provides a method and apparatus in a data processing system for serializing data. A serializer receives a data element for serialization, wherein the data element includes a class name string. Responsive to receiving the data element, the serializer replaces the class name string with a code having a smaller size than the class name string to form a modified data element. Responsive to forming the modified data element, in which the serializer serializes the modified data element. This serialized data is transmitted and deserialized by a deserializer, which replaces the indicator with the class name.
The present invention provides a method and apparatus in a data processing system for providing an interface to an application for monitoring execution of the application. An event generated by a view controller is detected, wherein the view controller handles presentation of a container in a graphical user interface. A determination is made as to whether the event is an event selected for monitoring. Responsive to the determination that the event is an event selected for monitoring, a request event is generated, wherein the request event includes data from the event and a destination.
The present invention provides a method and apparatus for a data processing system for accessing classes and methods in an object oriented system. Responsive to receiving a selected user input to a container, a view event is sent from a view controller to an application mediator. The view event identifies an action taken to generate the selected user input. A request is selectively generated based on the view event, wherein the request event includes a major code identifying a class name as a destination and a minor code identifying a method name a function to be invoked. The request event is sent to a transporter. The transporter acts as a router to send the request event to an appropriate destination object from a plurality of destination objects. Responsive to receiving the request event at the transporter, the request event is sent to a destination object within a plurality of destination objects based in the class name. The destination object formats the request event into a form recognizable by the destination associated with the destination object. The destination may be located on a remote data processing system. The request event is used to access the class or method identified in the request event. The access may be, for example, an invocation of the method.
The present invention provides a method and apparatus in a data processing system for dispatching events. An event from a first object is received. A type for the event is identified. A dispatching strategy is selected for the event based on parameter settings, a source of the event, and default settings to form a selected dispatching strategy. The event is dispatched using the selected dispatching strategy.